#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>


int cmp(const void* a, const void* b)
{
    return *(int*)a - *(int*)b;
}
int* numberGame(int* nums, int numsSize, int* returnSize)
{
    qsort(nums, numsSize, sizeof(int), cmp);
    *returnSize = numsSize;
    for (int i = 0; i < numsSize - 1; i += 2)
    {
        int mid = nums[i];
        nums[i] = nums[i + 1];
        nums[i + 1] = mid;
    }
    return nums;
}